package com.example.android.ui.login;

import com.example.android.bean.Login;
import com.example.android.bean.LoginToken;
import com.example.android.network.RetrofitClientLocal;
import com.example.android.network.service.LoginService;

import java.util.List;

import io.reactivex.rxjava3.core.Flowable;

public class LoginModel implements LoginContract.ILoginModel{
    @Override
    public Flowable<Login> getLoginData(String username,String password) {
        return RetrofitClientLocal.getInstance().getService(LoginService.class).getLoginData(username,password);
    }

    @Override
    public Flowable<List<LoginToken>> getTokenData(int userId, String token) {
        return RetrofitClientLocal.getInstance().getService(LoginService.class).getTokenData(userId,token);
    }
}
